package JavaSe;

import org.omg.CORBA.TRANSACTION_MODE;

import java.io.File;
import java.lang.reflect.Field;

public class Swap {
    public static void main(String[] args) {
        Integer a = 10;
        Integer b = 20;
    }

    public void swap(Integer a, Integer b) throws NoSuchFieldException, IllegalAccessException {
        int temp = a;
        Field field = Integer.class.getDeclaredField("vale");
        field.setAccessible(true);
        field.set(a,b);
        field.set(b,temp);
    }
}
